//
//  HALoginWithPassNavView.m
//  RedGrass
//
//  Created by wukong on 2018/12/6.
//  Copyright © 2018年 hongcaosp. All rights reserved.
//

#import "HALoginWithPassNavView.h"

@interface HALoginWithPassNavView()

@property (strong, nonatomic) UIButton *backBtn;

@end

@implementation HALoginWithPassNavView

-(instancetype) initWithFrame:(CGRect)frame{
    if(self = [super initWithFrame:frame]){
        [self addSubview:self.backBtn];
        [self addMasonry];
    }
    return self;
}

-(void) addMasonry{
    [_backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self).mas_offset(24);
        make.centerY.mas_equalTo(self).mas_offset(0);
    }];
}


#pragma mark - response

-(void)backBtnClick:(UIButton *)button{
    
}

-(void)passLoginBtnClick:(UIButton *)button{
    
}

#pragma mark - getter
-(UIButton *)backBtn{
    if(!_backBtn){
        _backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_backBtn setImage:IMAGE_NAMED(@"返回") forState:UIControlStateNormal];
        [_backBtn addTarget:self action:@selector(backBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        _backBtn.tag = 1000;
    }
    return _backBtn;
}


@end
